In [1]:
from msdas import *
%pylab inline
matplotlib.rcParams['savefig.dpi'] = 2 * matplotlib.rcParams['savefig.dpi']
In [2]:
from easydev import gsf
curated_pkn = gsf('msdas', 'data', 'PKN-yeastScaffold.sif')
In [3]:
y = yeast.YEAST2MIDAS(get_yeast_small_data(), get_yeast_raw_data())
In [4]:
y.df.Psite[0:5]
Out[4]:
In [5]:
y['GPA1']
Out[5]:
In [6]:
y.replicates['GPA1']
Out[6]:
In [7]:
y.plot_timeseries("GPA1_S199")
y.replicates.plot_timeseries("GPA1_T189+S199+S200", color="green")
ax = gca()
ax.legend(["small", "raw"])
Out[7]:
In [8]:
errors = y.get_errors()
errors.ix["GPA1_S199"]
Out[8]:
Here are errors at set to 0.5 (default if NA). This means that errors were NAs or could not be found. The reason for not being found is that labels in the merged raw data are different. We must call a function called cleanup_june
In [9]:
y.cleanup_june()
errors = y.get_errors()
errors.ix["GPA1_T189+S199+S200"]
Out[9]:
In [10]:
y.plot_timeseries_midas('GPA1_T189+S199+S200')
In [11]:
curated_pkn
Out[11]:
In [12]:
preference = -1 # meas no clustering
c, xm, xme = y.export_pkn_and_midas_june(curated_pkn, tag="test")
In [13]:
c.graph['dpi'] = 200;
c.plot()
matplotlib.rcParams['savefig.dpi'] = 2 * matplotlib.rcParams['savefig.dpi']
In [14]:
matplotlib.rcParams['savefig.dpi'] = .5 * matplotlib.rcParams['savefig.dpi']
xm.plot()
In [15]:
xm.scale_max_across_experiments()
xm.plot()
In [18]:
c.to_sif("PKN-Yeast-test.sif")
xm.to_midas("MD-Yeast_test_max_byexp.csv")
xme.to_midas("MD-Yeast_test_errors.csv")
In [19]:
xm.reset() # let us get back the original data to scale with other methods
In [20]:
xm.scale_max_across_experiments()
xm.to_midas("MD-Yeast_test_max_across.csv")
In [23]:
xm.reset()
xm.scale_min_max_across_experiments()
xm.to_midas("MD-Yeast_test_minmax_byexp.csv")
xm.reset()
xm.scale_min_max_across_experiments(1) # will be renamed
xm.to_midas("MD-Yeast_test_minmax_across.csv")
In [ ]: